<template>
  <div class="tab">
    <a-tag v-for="(item, index) in data.list">{{ item.title }}</a-tag>
  </div>
</template>

<script setup lang="ts">
import { reactive, onMounted } from "vue";
import { useRouter, onBeforeRouteUpdate ,useRoute} from "vue-router";

const router = useRouter();
const data = reactive({
  list: [
    {
      path: "/",
      title: "仪表盘",
    },
  ],
});
onMounted(() => {
  console.log(useRoute());
}),
  onBeforeRouteUpdate((to, from, next) => {
    console.log(to);
  });
</script>

<style scoped lang="scss">
.tab {
  width: 100%;
  height: 50px;
  line-height: 50px;
  .ant-tag {
    height: 30px;
  }
}
</style>